package com.zgkxzx;

import android.app.Activity;
import android.app.Instrumentation;
import android.content.Intent;
import android.util.Log;

/**
 * 创建者 zgkxzx
 * 日期   12/25/17
 * 描述
 */
public class CustomInstrumentation extends Instrumentation{
    private Instrumentation base;
    public CustomInstrumentation(Instrumentation base) {
        this.base = base;
    }
    //重写创建Activity的方法
    @Override
    public Activity newActivity(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
        Log.d("[app]","you are hook!,做自己想要的事情");
        Log.d("[app]","className="+className+" intent="+intent);
        return super.newActivity(cl, className, intent);
    }
}
